package com.zjt.videoplayer.adpter;

import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.zjt.itemvideoplayer.ItemVideoPlayer;
import com.zjt.itemvideoplayer.ItemVideoPlayerController;
import com.zjt.videoplayer.R;

public class VideoPlayerItemHolder extends RecyclerView.ViewHolder {

    public ItemVideoPlayerController mController;
    public ItemVideoPlayer mVideoPlayer;

    public VideoPlayerItemHolder(View itemView) {
        super(itemView);
        mVideoPlayer =  (ItemVideoPlayer)itemView.findViewById(R.id.item_video_view);
    }

    public VideoPlayerItemHolder(LayoutInflater inflater, ViewGroup parent) {
        this(inflater.inflate(R.layout.item_video_player, parent, false));
    }

    public void setController(ItemVideoPlayerController controller) {
        mController = controller;
    }

    public ItemVideoPlayerController getController() {
        return mController;
    }

    public ItemVideoPlayer getVideoPlayer() {
        return mVideoPlayer;
    }

    public void setVideoPlayer(ItemVideoPlayer mVideoPlayer) {
        this.mVideoPlayer = mVideoPlayer;
    }
}
